#ifndef _STDIOLIB_H_
#define _STDIOLIB_H_

#include <limits.h>

/* bit macro funcitions */
#define CEL_BIT_OPEN(str, n)	(str[(n)/CHAR_BIT] |= (0x01<<((n)%CHAR_BIT)))
#define CEL_BIT_SHUT(str, n)	(str[(n)/CHAR_BIT] &= (~(0x01<<((n)%CHAR_BIT))))
#define CEL_BIT_FETCH(str, n)	(str[(n)/CHAR_BIT] &  (0x01<<((n)%CHAR_BIT)))

void cel_mem_swap(void *a, void *b, int size);
void cel_mem_copy( void *_src, void *_dst, int size);
void cel_mem_bits(const char *name, const void *ptr, unsigned int __bytes);
void cel_mem_store(const void * _src, unsigned int start, unsigned int bits, void * _dst, unsigned int idx);
long long cel_filesize(char *file);

#endif //_STDIOLIB_H_
